package com.example.rabbitmq.config;


import org.springframework.amqp.core.Queue;
import org.springframework.amqp.rabbit.annotation.EnableRabbit;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@EnableRabbit
@Configuration
public class RabbitMqConfig {
    @Bean
    public static Queue queue() {
        return new Queue("orderQueue", true);
    }

    public static RabbitTemplate rabbitTemplate() {
        return new RabbitTemplate();
    }
}
